<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>中奖历史</title>
	<link href="#" rel="shortcut icon">
	<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
	<script src="js/md5.js"></script>
	<script src="js/layer.js"></script>
	<script type="text/javascript" src="js/public.js"></script>
	<link type="text/css" rel="stylesheet" href="css/layout.css">
	<link rel="stylesheet" type="text/css" href="css/bifa.css">

</head>

<body>
	<iframe src="./header.html" id="header" width="100%" height="185" frameborder="0" scrolling="no" ></iframe>		
	<div class="standing">
		<div class="stand-w w clearfix">
			<div class="stand-left">
				<div class="user-person">
					<div class="user-mess">
						<div class="mess-pic"><img /></div>
						<div class="mess-name">
							<p>账户名：<span id="user-name"></span></p>
							<p>余额：<span id="user-total"></span></p>
						</div>
					</div>
					<div class="tw-btn">
						<span class="recharge-btn">充值</span>
						<span class="withdraw-btn">提现</span>
					</div>
				</div>
				<ul class="stand-ul">
					<li class="hover">
						<a href="lottery.html">
							<div class="stand-list">
								<img src="images/lottery.png" >
								<span>中奖历史</span>
							</div>
						</a>
					</li>
					<li>
						<a href="standings.html">
							<div class="stand-list">
								<img src="images/standings.png" >
								<span>战绩</span>
							</div>
						</a>
					</li>
					<li>
						<a href="detail.html">
							<div class="stand-list">
								<img src="images/detail.png" >
								<span>账户明细</span>
							</div>
						</a>
					</li>
					<li>
						<a href="transaction.html">
							<div class="stand-list">
								<img src="images/transaction.png" >
								<span>交易记录</span>
							</div>
						</a>
					</li>
					<li>
						<a href="personal.html">
							<div class="stand-list">
								<img src="images/personal.png" >
								<span>个人资料</span>
							</div>
						</a>
					</li>
					<li>
						<a id="server">
							<div class="stand-list">
								<img src="images/server.png" >
								<span>客服</span>
							</div>
						</a>
					</li>
					<li>
						<a href="information.html">
							<div class="stand-list">
								<img src="images/information.png" >
								<span>消息中心</span>
							</div>
						</a>
					</li>
				</ul>
			</div>
			<div class="stand-right">
				<div class="stanr-top">
					<h3>开奖历史</h3>
					<div class="stanr-nav">
						<span class="hover">重庆时时彩</span>
						<span>北京赛车</span>
						<span>香港六合彩</span>
						<span>分分彩</span>
						<span>急速赛车</span>
						<span>急速六合彩</span>
					</div>
				</div>
				<div class="stanr-body">
					<ul class="stanr-list">
						
					</ul>
					<span class="nomore">没有更多了~</span>
					<div id="laypage">
						<span class="prev">上一页</span>
						<span class="next">下一页</span>
					</div>
					
				</div>

			</div>
		</div>
	</div>
	

	<iframe src="./footer.html" width="100%" height="80" frameborder="0" scrolling="no" ></iframe>	


	<script>
		// 战绩
		$(function(){

			var num = 1;
			var uid = getCookie('uid');
			var userObj = jsonObj;//个人信息
			userObj.uid = uid;

			var standObj = jsonObj;//战绩
			standObj.uid = uid;
			standObj.rows = 10;
			standObj.type = 'cqssc';
			//用户信息
			$ajax(
				url+'member_info',
				'post',
				userObj,
				function(data){
					
					if(data.data.avatar){
						$('.mess-pic img').attr('src',data.data.avatar);//用户头像
					}else{
						$('.mess-pic img,.li-pic img').attr('src','images/user-pic.png');
					}
					$('#user-name').text(data.data.username);
					$('#user-total').text(data.data.balance);
					$('#server').click(function(){ //客服
						openQQ(data.data.serviceQQ)
					})
					
					deposit(data) //提现


				},
				function(data){
					layer.msg(data.msg)
				}
			)

			// 点击切换
			$('.stanr-nav span').click(function(){
				var index  = $(this).index();
				$(this).addClass('hover').siblings().removeClass('hover');
				num = 1
				switch(index){
					case 0:
						standObj.type = 'cqssc';
					break;
					case 1:
						standObj.type = 'bjpk10';
					break;
					case 2:
						standObj.type = 'xglhc';
					break;
					case 3:
						standObj.type = 'yfssc';
					break;
					case 4:
						standObj.type = 'yfsc';
					break;
					case 5:
						standObj.type = 'bflhc';
					break;
				}
				
				page(num)
			})
			// 显示内容
			function page(num){
				standObj.page = num;
	
				$ajax(
					url+'lott_list',
					'post',
					standObj,
					function(data){
						
						var list = data.data;
	
						if(list.length == 0){
							$('.prev').hide();
							$('.next').hide()
							$('.nomore').show();

						}else if( list.length < 10 && list.length > 0){
							$('.next').hide()
							$('.nomore').show();
							$('.prev').show();
						}else{
							$('.prev').show();
							$('.next').show();
							$('.nomore').hide();
						}
						var res = '';
						for(var i = 0,iL = list.length;i<iL;i++){
							res+='<li>'+
											'<span class="st-lottery" style="width:25%">第'+list[i].issue+'期</span>'+
											'<span class="st-issue" style="width:30%;text-align:center">'+list[i].number.replace(RegExp(/,/g),' ')+'</span>'+
											'<span class="st-createTime" style="width:43%">'+list[i].openDate+'</span>'+
										'</li>';
						}
						$('.stanr-list').html(res)
					},
					function(data){
						layer.msg(data.msg)
						
					}
				)
			}
			
			page(num);
			// 下翻页
			$('.next').click(function(){
				num++;
				page(num);
			})
			// 上翻页
			$('.prev').click(function(){
				
				num <= 1 ? num = 1: num--
				page(num);
			})

			// 充值
			$('.recharge-btn').click(function(){
				window.location.href = './recharge.html'
			})
			
		})
	</script>
	<script type="text/javascript" src="js/adver.js"></script>
</body>

</html>